<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>聊天室 - 天幕</title>
  <link rel="stylesheet" href="style.css">
  <style>
    .back-btn {
      position: fixed;
      top: 20px;
      left: 20px;
      padding: 8px 16px;
      background: rgba(255, 255, 255, 0.2);
      color: white;
      border: 2px solid white;
      border-radius: 20px;
      cursor: pointer;
      transition: all 0.3s ease;
      z-index: 1000;
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 0.9rem;
    }

    .back-btn:hover {
      background: white;
      color: #6a11cb;
    }

    .back-btn svg {
      width: 16px;
      height: 16px;
    }

    @media (max-width: 768px) {
      .back-btn {
        top: 10px;
        left: 10px;
        padding: 6px 12px;
        font-size: 0.8rem;
      }
    }
  </style>
</head>
<body>
  <button class="back-btn" onclick="location.href='/index'">
    <svg viewBox="0 0 24 24" fill="currentColor">
      <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/>
    </svg>
    返回首页
  </button>
  
  <div class="container">
    <div class="chat-box" style="display: block;">
      <div class="messages" id="messages"></div>
      <div class="input-area">
        <input type="text" id="messageInput" placeholder="输入消息...">
        <button id="sendBtn">发送</button>
      </div>
    </div>
  </div>
  <script src="/socket.io/socket.io.js"></script>
  <script src="script.js"></script>
</body>
</html> 